Field of the Invention
The present invention relates to an image forming apparatus, a control method of the image forming apparatus, and a program.
Description of the Related Art
Recently, a technique in which a time period required for startup of software is shortened has been established as a power saving technique. In the technique, an apparatus shifts to a sleep mode in which only a Dynamic Random Access Memory (DRAM) is energized when the apparatus is not used for a certain period of time or when a switch of the electronic apparatus is turned OFF, and when the switch of the electronic apparatus is turned ON in the next time, the electronic apparatus is returned from the sleep mode. Japanese Patent Laid-open Publication No. 07-17111 discusses the above technique or applying to an image forming apparatus.
In the image forming apparatus to which the above described sort of power saving technique is applied, there is a case where the image forming apparatus is not allowed to shift to the sleep mode when a switch thereof is turned OFF. Examples of the case where the image forming apparatus is not allowed to shift to the sleep mode include, for example, a case where some abnormality occurs in the image forming apparatus or when the image forming apparatus is in running some processing that disables normal processing of the image forming apparatus upon returning from the sleep mode if the processing is interrupted for the purpose of the shifting to the sleep mode.
When the turning OFF of the switch does not affect on a power supply of a drive unit of the image forming apparatus (i.e., when the power supply to the drive unit is not mechanically turned OFF even when the switch is turned OFF), even when the image forming apparatus is not allowed to shift to the sleep mode, no cause occurs even if the image forming apparatus does not shift to the sleep mode immediately.
However, when the turning OFF of the switch mechanically turns OFF the power supply of the drive unit of the image forming apparatus (i.e., when the turning OFF of the switch mechanically turns OFF the power supply to the drive unit), the image forming apparatus needs to promptly shift to, for example, the sleep mode even when the image forming apparatus is not allowed to shift to the sleep mode. Therefore, in the image forming apparatus to which the above described sort of power saving technique is applied, when the image forming apparatus is not allowed to shift to the sleep mode, by the turning OFF of the switch, the image forming apparatus does not shift to the sleep mode but shuts down.
However, especially when a power saving function is effective, a user expects that the turning OFF of the switch allows the image forming apparatus to shift to the sleep mode not shut down. Therefore, when the switch is turned OFF, it is desirable that the image forming apparatus shift to the sleep mode as many cases as possible.